package cool.taomu.toolkit.quartz

import com.google.auto.service.AutoService
import cool.taomu.toolkit.TaomuConfigure
import cool.taomu.toolkit.platform.inter.AbsPlatform
import cool.taomu.toolkit.platform.inter.IPlatform
import cool.taomu.toolkit.quartz.module.QuartzModule
import org.quartz.Scheduler

@AutoService(IPlatform)
//@PriorityOrder
class QuartzPlugin extends AbsPlatform {

    override note() {
        "Quartz插件"
    }

    override packages() {
    }

    override module(TaomuConfigure config) {
        new QuartzModule(config)
    }

    override start() {
        this.context.executor.execute([
            var s = this.context.getInstance(Scheduler) as Scheduler
            s.start
        ])

    }

    override init() {
    }
}
